package com.yyk.yykywd.base;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;


/**
 * Created by Administrator on 2018/9/18 0018.
 */

public abstract class NewBaseFragment extends Fragment {
    protected Boolean isShow = false;

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        initView();
        setListener();
    }
    public abstract void initView();
    public void setListener() {

    }

    @Override
    public void onHiddenChanged(boolean hidden) {
        super.onHiddenChanged(hidden);
        if (!hidden) {
            isShow = true;
            interfaceIsVisible();
        } else {
            isShow = false;
        }
    }

    @Override
    public void onResume() {
        super.onResume();
        if (isShow) {
            interfaceIsVisible();
        }
    }

    protected void interfaceIsVisible() {

    }
}
